package org.rasterfun.language2

/**
 * Represents a variable reference
 * 
 * @author Hans Haggstrom
 */
class Var(name: Symbol) extends Expression {
  // TODO: Ensure name is a valid java identifier

	// TODO: Calculate kind based on the referenced variable.
	private var variableType: Kind = null

	def kind = variableType

	def generateCode(context: Context, s: StringBuilder) {
    s.append(" ")
    s.append(name.name)
    s.append(" ")
  }

  protected override def alwaysInline = true

}

